Algorithmic Composition
   HOME

TheInfoList



OR:

Algorithmic composition is the technique of using
algorithm In mathematics and computer science, an algorithm () is a finite sequence of rigorous instructions, typically used to solve a class of specific Computational problem, problems or to perform a computation. Algorithms are used as specificat ...
s to create
music Music is generally defined as the art of arranging sound to create some combination of form, harmony, melody, rhythm or otherwise expressive content. Exact definitions of music vary considerably around the world, though it is an aspect ...
. Algorithms (or, at the very least, formal sets of rules) have been used to
compose Composition or Compositions may refer to: Arts and literature *Composition (dance), practice and teaching of choreography *Composition (language), in literature and rhetoric, producing a work in spoken tradition and written discourse, to include v ...
music for centuries; the procedures used to plot
voice-leading Voice leading (or part writing) is the linear progression of individual melodic lines (Part (music), voices or parts) and their interaction with one another to create Harmony, harmonies, typically in accordance with the principles of Common practi ...
in Western
counterpoint In music, counterpoint is the relationship between two or more musical lines (or voices) which are harmonically interdependent yet independent in rhythm and melodic contour. It has been most commonly identified in the European classical tradi ...
, for example, can often be reduced to algorithmic determinacy. The term can be used to describe music-generating techniques that run without ongoing human intervention, for example through the introduction of
chance Chance may refer to: Mathematics and Science * In mathematics, likelihood of something (by way of the Likelihood function and/or Probability density function). * ''Chance'' (statistics magazine) Places * Chance, Kentucky, US * Chance, Mary ...
procedures. However through
live coding Live coding, sometimes referred to as on-the-fly programming,Wang G. & Cook P. (2004"On-the-fly Programming: Using Code as an Expressive Musical Instrument" In ''Proceedings of the 2004 International Conference on New Interfaces for Musical Expr ...
and other interactive interfaces, a fully human-centric approach to algorithmic composition is possible. Some algorithms or data that have no immediate musical relevance are used by composers as creative inspiration for their music. Algorithms such as
fractals In mathematics, a fractal is a geometric shape containing detailed structure at arbitrarily small scales, usually having a fractal dimension strictly exceeding the topological dimension. Many fractals appear similar at various scales, as illus ...
,
L-system An L-system or Lindenmayer system is a parallel rewriting system and a type of formal grammar. An L-system consists of an alphabet of symbols that can be used to make strings, a collection of production rules that expand each symbol into som ...
s, statistical models, and even arbitrary
data In the pursuit of knowledge, data (; ) is a collection of discrete values that convey information, describing quantity, quality, fact, statistics, other basic units of meaning, or simply sequences of symbols that may be further interpreted ...
(e.g.
census A census is the procedure of systematically acquiring, recording and calculating information about the members of a given population. This term is used mostly in connection with national population and housing censuses; other common censuses incl ...
figures,
GIS A geographic information system (GIS) is a type of database containing Geographic data and information, geographic data (that is, descriptions of phenomena for which location is relevant), combined with Geographic information system software, sof ...
coordinates, or
magnetic field A magnetic field is a vector field that describes the magnetic influence on moving electric charges, electric currents, and magnetic materials. A moving charge in a magnetic field experiences a force perpendicular to its own velocity and to ...
measurements) have been used as source materials.


Models for algorithmic composition

Compositional algorithms are usually classified by the specific programming techniques they use. The results of the process can then be divided into 1) music composed by computer and 2) music composed with the aid of computer. Music may be considered composed by computer when the algorithm is able to make choices of its own during the creation process. Another way to sort compositional algorithms is to examine the results of their compositional processes. Algorithms can either 1) provide notational information (
sheet music Sheet music is a handwritten or printed form of musical notation that uses List of musical symbols, musical symbols to indicate the pitches, rhythms, or chord (music), chords of a song or instrumental Musical composition, musical piece. Like ...
or
MIDI MIDI (; Musical Instrument Digital Interface) is a technical standard that describes a communications protocol, digital interface, and electrical connectors that connect a wide variety of electronic musical instruments, computers, and re ...
) for other instruments or 2) provide an independent way of
sound synthesis A synthesizer (also spelled synthesiser) is an electronic musical instrument that generates audio signals. Synthesizers typically create sounds by generating waveforms through methods including subtractive synthesis, additive synthesis and f ...
(playing the composition by itself). There are also algorithms creating both notational data and sound synthesis. One way to categorize compositional algorithms is by their structure and the way of processing data, as seen in this model of six partly overlapping types: * translational models * mathematical models * knowledge-based systems * grammars * optimization approaches * evolutionary methods * systems which learn * hybrid systems


Translational models

This is an approach to music synthesis that involves "translating" information from an existing non-musical medium into a new sound. The translation can be either rule-based or
stochastic Stochastic (, ) refers to the property of being well described by a random probability distribution. Although stochasticity and randomness are distinct in that the former refers to a modeling approach and the latter refers to phenomena themselv ...
. For example, when translating a picture into sound, a
jpeg JPEG ( ) is a commonly used method of lossy compression for digital images, particularly for those images produced by digital photography. The degree of compression can be adjusted, allowing a selectable tradeoff between storage size and imag ...
image of a horizontal line may be interpreted in sound as a constant pitch, while an upwards-slanted line may be an ascending scale. Oftentimes, the software seeks to extract concepts or metaphors from the medium, (such as height or sentiment) and apply the extracted information to generate songs using the ways music theory typically represents those concepts. Another example is the translation of text into music, which can approach composition by extracting sentiment (positive or negative) from the text using
machine learning Machine learning (ML) is a field of inquiry devoted to understanding and building methods that 'learn', that is, methods that leverage data to improve performance on some set of tasks. It is seen as a part of artificial intelligence. Machine ...
methods like
sentiment analysis Sentiment analysis (also known as opinion mining or emotion AI) is the use of natural language processing, text analysis, computational linguistics, and biometrics to systematically identify, extract, quantify, and study affective states and subjec ...
and represents that sentiment in terms of chord quality such as minor (sad) or major (happy) chords in the musical output generated.


Mathematical models

Mathematical models are based on mathematical equations and random events. The most common way to create compositions through mathematics is
stochastic processes In probability theory and related fields, a stochastic () or random process is a mathematical object usually defined as a family of random variables. Stochastic processes are widely used as mathematical models of systems and phenomena that appe ...
. In stochastic models a piece of music is composed as a result of non-
deterministic Determinism is a philosophical view, where all events are determined completely by previously existing causes. Deterministic theories throughout the history of philosophy have developed from diverse and sometimes overlapping motives and consi ...
methods. The compositional process is only partially controlled by the composer by weighting the possibilities of random events. Prominent examples of stochastic algorithms are
Markov chains A Markov chain or Markov process is a stochastic process, stochastic model describing a sequence of possible events in which the probability of each event depends only on the state attained in the previous event. Informally, this may be thought ...
and various uses of Gaussian distributions. Stochastic algorithms are often used together with other algorithms in various decision-making processes. Music has also been composed through natural phenomena. These chaotic models create compositions from the
harmonic A harmonic is a wave with a frequency that is a positive integer multiple of the ''fundamental frequency'', the frequency of the original periodic signal, such as a sinusoidal wave. The original signal is also called the ''1st harmonic'', the ...
and inharmonic phenomena of nature. For example, since the 1970s
fractals In mathematics, a fractal is a geometric shape containing detailed structure at arbitrarily small scales, usually having a fractal dimension strictly exceeding the topological dimension. Many fractals appear similar at various scales, as illus ...
have been studied also as models for algorithmic composition. As an example of deterministic compositions through mathematical models, the
On-Line Encyclopedia of Integer Sequences The On-Line Encyclopedia of Integer Sequences (OEIS) is an online database of integer sequences. It was created and maintained by Neil Sloane while researching at AT&T Labs. He transferred the intellectual property and hosting of the OEIS to the ...
provides an option to play an
integer sequence In mathematics, an integer sequence is a sequence (i.e., an ordered list) of integers. An integer sequence may be specified ''explicitly'' by giving a formula for its ''n''th term, or ''implicitly'' by giving a relationship between its terms. For ...
as
12-tone equal temperament Twelve-tone equal temperament (12-TET) is the musical system that divides the octave into 12 parts, all of which are equally tempered (equally spaced) on a logarithmic scale, with a ratio equal to the 12th root of 2 ( ≈ 1.05946). That resultin ...
music. (It is initially set to convert each integer to a note on an 88-key
musical keyboard A musical keyboard is the set of adjacent depressible levers or keys on a musical instrument. Keyboards typically contain keys for playing the twelve notes of the Western musical scale, with a combination of larger, longer keys and smaller, sho ...
by computing the integer modulo 88, at a steady rhythm. Thus 123456, the natural numbers, equals half of a chromatic scale.) As another example, the all-interval series has been used for computer-aided composition


Knowledge-based systems

One way to create compositions is to isolate the aesthetic code of a certain musical genre and use this code to create new similar compositions.
Knowledge-based systems A knowledge-based system (KBS) is a computer program that reasons and uses a knowledge base to solve complex problems. The term is broad and refers to many different kinds of systems. The one common theme that unites all knowledge based systems i ...
are based on a pre-made set of arguments that can be used to compose new works of the same style or genre. Usually this is accomplished by a set of tests or rules requiring fulfillment for the composition to be complete.


Grammars

Music can also be examined as a language with a distinctive
grammar In linguistics, the grammar of a natural language is its set of structure, structural constraints on speakers' or writers' composition of clause (linguistics), clauses, phrases, and words. The term can also refer to the study of such constraint ...
set. Compositions are created by first constructing a musical grammar, which is then used to create comprehensible musical pieces. Grammars often include rules for macro-level composing, for instance
harmonies In music, harmony is the process by which individual sounds are joined together or composed into whole units or compositions. Often, the term harmony refers to simultaneously occurring frequencies, pitches ( tones, notes), or chords. However ...
and
rhythm Rhythm (from Greek , ''rhythmos'', "any regular recurring motion, symmetry") generally means a " movement marked by the regulated succession of strong and weak elements, or of opposite or different conditions". This general meaning of regular recu ...
, rather than single notes.


Optimization approaches

When generating well defined styles, music can be seen as a combinatorial optimization problem, whereby the aim is to find the right combination of notes such that the objective function is minimized. This objective function typically contains rules of a particular style, but could be learned using machine learning methods such as Markov models. Researchers have generated music using a myriad of different optimization methods, including integer programming, variable neighbourhood search, and evolutionary methods as mentioned in the next subsection.


Evolutionary methods

Evolutionary methods of composing music are based on
genetic algorithms In computer science and operations research, a genetic algorithm (GA) is a metaheuristic inspired by the process of natural selection that belongs to the larger class of evolutionary algorithms (EA). Genetic algorithms are commonly used to gene ...
. The composition is being built by the means of
evolutionary Evolution is change in the heritable characteristics of biological populations over successive generations. These characteristics are the expressions of genes, which are passed on from parent to offspring during reproduction. Variation ...
process. Through
mutation In biology, a mutation is an alteration in the nucleic acid sequence of the genome of an organism, virus, or extrachromosomal DNA. Viral genomes contain either DNA or RNA. Mutations result from errors during DNA or viral replication, mi ...
and
natural selection Natural selection is the differential survival and reproduction of individuals due to differences in phenotype. It is a key mechanism of evolution, the change in the heritable traits characteristic of a population over generations. Charle ...
, different solutions evolve towards a suitable musical piece. Iterative action of the algorithm cuts out bad solutions and creates new ones from those surviving the process. The results of the process are supervised by the critic, a vital part of the algorithm controlling the quality of created compositions.


Evo-Devo approach

Evolutionary Evolution is change in the heritable characteristics of biological populations over successive generations. These characteristics are the expressions of genes, which are passed on from parent to offspring during reproduction. Variation ...
methods, combined with developmental processes, constitute the ''evo-devo'' approach for generation and optimization of complex structures. These methods have also been applied to music composition, where the musical structure is obtained by an iterative process that transform a very simple composition (made of a few notes) into a complex fully-fledged piece (be it a score, or a MIDI file).


Systems that learn

Learning systems are programs that have no given knowledge of the genre of music they are working with. Instead, they collect the learning material by themselves from the example material supplied by the user or programmer. The material is then processed into a piece of music similar to the example material. This method of algorithmic composition is strongly linked to algorithmic modeling of style, machine improvisation, and such studies as cognitive science and the study of
neural networks A neural network is a network or circuit of biological neurons, or, in a modern sense, an artificial neural network, composed of artificial neurons or nodes. Thus, a neural network is either a biological neural network, made up of biological ...
. Assayag and Dubnov proposed a variable length
Markov model In probability theory, a Markov model is a stochastic model used to model pseudo-randomly changing systems. It is assumed that future states depend only on the current state, not on the events that occurred before it (that is, it assumes the Mark ...
to learn motif and phrase continuations of different length. Marchini and Purwins presented a system that learns the structure of an audio recording of a rhythmical percussion fragment using unsupervised clustering and variable length Markov chains and that synthesizes musical variations from it.


Hybrid systems

Programs based on a single algorithmic model rarely succeed in creating aesthetically satisfying results. For that reason algorithms of different type are often used together to combine the strengths and diminish the weaknesses of these algorithms. Creating hybrid systems for music composition has opened up the field of algorithmic composition and created also many brand new ways to construct compositions algorithmically. The only major problem with hybrid systems is their growing complexity and the need of resources to combine and test these algorithms. Another approach, which can be called ''computer-assisted composition'', is to algorithmically create certain structures for finally "hand-made" compositions. As early as in the 1960s,
Gottfried Michael Koenig Gottfried Michael Koenig (5 October 1926 – 30 December 2021)"In Memoriam Got ...
developed computer programs ''Project 1'' and ''Project 2'' for
aleatoric music Aleatoric music (also aleatory music or chance music; from the Latin word ''alea'', meaning "dice") is music in which some element of the composition is left to chance, and/or some primary element of a composed work's realization is left to the ...
, the output of which was sensibly structured "manually" by means of performance instructions. In the 2000s,
Andranik Tangian Andranik Semovich Tangian (Melik-Tangyan) (Russian: Андраник Семович Тангян (Мелик-Тангян)); born March 29, 1952) is a Soviet Armenian-German mathematician, political economist and music theorist. Tangian is known ...
developed a computer algorithm to determine the time event structures for rhythmic canons and rhythmic fugues, which were then worked out into harmonic compositions ''Eine kleine Mathmusik I'' and ''Eine kleine Mathmusik II''; for scores and recordings see.


See also

* Change ringing *
Computational creativity Computational creativity (also known as artificial creativity, mechanical creativity, creative computing or creative computation) is a multidisciplinary endeavour that is located at the intersection of the fields of artificial intelligence, cogn ...
* Euclidean rhythm (traditional musical rhythms that are generated by
Euclid's algorithm In mathematics, the Euclidean algorithm,Some widely used textbooks, such as I. N. Herstein's ''Topics in Algebra'' and Serge Lang's ''Algebra'', use the term "Euclidean algorithm" to refer to Euclidean division or Euclid's algorithm, is an ef ...
) *
Generative music Generative music is a term popularized by Brian Eno to describe music that is ever-different and changing, and that is created by a system. Historical background In 1995 whilst working with SSEYO's Koan software (built by Tim Cole and Pete Col ...
* Musical dice game * Pop music automation *
List of music software This is a list of software for creating, performing, learning, analyzing, researching, broadcasting and editing music. This article only includes software, not services. For streaming services such as iHeartRadio, Pandora, Prime Music, and Spotify, ...


References


Further reading


"Algorithmic Composition: Computational Thinking in Music"
by Michael Edwards. ''
Communications of the ACM ''Communications of the ACM'' is the monthly journal of the Association for Computing Machinery (ACM). It was established in 1958, with Saul Rosen as its first managing editor. It is sent to all ACM members. Articles are intended for readers with ...
'', vol. 54, no. 7, pp. 58–67 *
Karlheinz Essl Karlheinz Essl (born 15 August 1960) is an Austrian composer, performer, sound artist, improviser, and composition teacher. Biography Essl was born in Vienna. His studies at the University of Music in Vienna included: composition (under Friedr ...
: ''Algorithmic Composition.'' in: '' Cambridge Companion to Electronic Music'', ed. by Nicholas Collins and Julio d'Escrivan, Cambridge University Press 2007.
AbstractComputer Music Algorithms
by Dr. John Francis. Music algorithmic computer programs representing all styles of music, with C source code, produces midi files. 19th ed 2019, now contain 57 programs, 20 styles, and 24 chapters.
"A Functional Taxonomy of Music Generation systems"
by Dorien Herremans, Ching-Hua Chuang and
Elaine Chew Elaine Chew is an operations researcher and pianist focused on the study of musical structures as they apply to musical performance, composition and cognition, the analysis of electrocardiographic traces of Heart arrhythmia, arrhythmia, and digita ...
. '' ACM Computing Surveys'', vol. 55, no. 5, pp. 69:1–30 . *
Eduardo Reck Miranda Eduardo Reck Miranda (born 1963) is a Brazilian composer of chamber and electroacoustic pieces but is most notable in the United Kingdom for his scientific research into computer music, particularly in the field of human-machine interfaces wh ...
: ''Composing Music with Computers.'' Focal Press 2001 *Gerhard Nierhaus: ''Algorithmic Composition – Paradigms of Automated Music Generation.'' Springer 2008. * Curtis Roads: ''The Computer Music Tutorial.'' MIT Press 1996
"Automatic Composition from Non-musical Inspiration Sources"
by Robert Smith, et al.

by Martin Supper. '' Computer Music Journal'' 25.1 (2001) 48–53 *Phil Winsor and Gene De Lisa: ''Computer Music in C.'' Windcrest 1990. *Wooller, Rene, Brown, Andrew R, Miranda, Eduardo, Diederich, Joachim, & Berry, Rodney (2005
"A framework for comparison of process in algorithmic music systems."
In: ''Generative Arts Practice'', 5–7 December 2005, Sydney, Australia.
"Composing with Process: Perspectives on Generative and Systems Music"
podcast


External links

*
Algorithmic Composer
series of algorithmic composition tutorials {{Computer music Computer music Music theory Markov models Procedural generation